<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #checkbox {
      display: none;
    }

    #label {
      width: 20px;
      background: url(../imgs/notchecked.png) no-repeat;
      background-size: 20px 20px;
      padding-left: 20px;
    }

    #checkbox:checked+label {
      background: url(../imgs/checked.png) no-repeat;
      background-size: 20px 20px;
      padding-left: 20px;
    }
  </style>
</head>

<body>
  <input type="checkbox" id="checkbox">
  <label id="label" for="checkbox">必须有文字吗</label>
</body>

</html>